package com.jk.litterapp.service.impl;

import com.jk.litterapp.domain.pojo.Book;
import com.jk.litterapp.repository.BookRepository;
import com.jk.litterapp.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;

/**
 * @Project: litter-app
 * @Author: Jack
 * @CreateTime: 2018/1/25 17:35
 * @Describe:
 */
@Component
public class BookServiceImpl implements BookService{

    @Autowired
    private BookRepository bookRepository;

    @Override
    public Page<Book> findPage(Pageable pageable) {
        return bookRepository.findAll(pageable);
    }
}
